from django.contrib import admin
from django.utils.html import format_html

from .models import Profile


# Register your models here.


@admin.register(Profile)
class ProfileAdmin(admin.ModelAdmin):
    list_display = ['user', 'date_of_birth', 'photo', 'operator']

    def operator(self, obj):
        return format_html(f'<a href="/admin/account/profile/{obj.id}/change/">编辑</a>')

    operator.short_description = '操作'


admin.site.site_header = 'bookmarks'
admin.site.site_title = 'bookmarks后台系统'
